//
//  NSString+STR.m
//  SafeFoodManagerDemo
//
//  Created by 振轩 on 2018/4/12.
//  Copyright © 2018年 bob. All rights reserved.
//

#import "NSString+STR.h"

@implementation NSString (STR)


+ (NSMutableAttributedString *)strToAttriWithStr:(NSString *)htmlStr{
   NSMutableAttributedString *str = [[NSMutableAttributedString alloc] initWithData:[htmlStr dataUsingEncoding:NSUnicodeStringEncoding]
                                            options:@{NSDocumentTypeDocumentAttribute:NSHTMLTextDocumentType}
                                 documentAttributes:nil
                                              error:nil];
    
    
    [str addAttribute:NSFontAttributeName value:[UIFont boldSystemFontOfSize:13] range:NSMakeRange(0, str.length)];
    
    return  str;
}

@end
